package com.junjun.ssm.dao;

import com.junjun.ssm.entity.MovieEntity;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import java.util.List;

public interface MoveDao extends CrudRepository<MovieEntity,String> {


    @Query("from MovieEntity m where m.movieName=?1 ")
    MovieEntity findAllByName(String movieName);

    @Query("from MovieEntity ")
    List<MovieEntity> findAllMovie();
}
